package com.honey.compilation.sql.ddl;

import com.honey.compilation.sql.SqlConstraint;
import com.honey.compilation.sql.SqlKeyWord;
import com.honey.core.builder.CharacterBuilder;
import com.honey.core.builder.CharacterBuilderFactory;
import com.honey.core.compiler.IndentSpace;
/**
 * Not Null 约束 
 * @author Administrator
 *
 */
public class ConstraintNotNull extends SqlConstraint{
	
	/*
	 * (non-Javadoc)
	 * @see com.honey.core.dom.sql.SqlConstraint#getSQLConstraintType()
	 */
	@Override
	public SQLConstraintType getSQLConstraintType() {
		
		return SQLConstraintType.NOT_NULL;
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.honey.core.dom.CompilationElement#compiledContent(int)
	 */
	@Override
	public CharacterBuilder compiledContent(int indentLevel) {
		CharacterBuilder answer = CharacterBuilderFactory.createC16StringBuilder();
		IndentSpace.spaceIndent(answer, indentLevel);
		answer.append(SqlKeyWord.NOT).
		append(SqlKeyWord.NULL);
		return answer;
	}


}
